import { createApp } from 'vue'
import pinia from './store'
import App from './App.vue'
import router from './router'
import button from "@/components/button/index.vue"
const app = createApp(App);
app.component("button",button)

//饿了吗组件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
app.use(ElementPlus)

//全局引入vant
import Vant from 'vant'
import 'vant/lib/index.css'
app.use(Vant)
//vant部分组件 按需引入
//tabbar  .backtop,下拉刷新
import { Tabbar, TabbarItem ,BackTop ,PullRefresh,Tab ,Tabs} from 'vant';
app.use(Tabbar);
app.use(TabbarItem);
app.use(BackTop);
app.use(PullRefresh);
app.use(Tab);
app.use(Tabs);

//引入mock
import '@/mock';
//注册全局组件 navbar 底部导航条,下拉刷新，返回顶部
import TopList from './components/TopList/index.vue'
//引入rem适配依赖
import 'amfe-flexible'
//引入轮播图
import { Swipe, SwipeItem } from 'vant';
//tabbar  .backtop

// import { getCode } from './api/login';
// getCode("13700000000").then(res=>{
//     console.log(res);
    
// })
app.use(Vant)
//vant部分组件 按需引入
app.use(Tabbar);
app.use(TabbarItem);
app.use(BackTop);

import navbar from '@/components/navbar.vue'
app.component('TopList',TopList)
app.component('navbar',navbar)

app.use(Swipe);
app.use(SwipeItem)
app.use(pinia)
app.use(router).mount('#app')
